﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace Chinaer.WCF.WebHost.Security
{
    public class APIKeyRepository
    {
        /// <summary>
        /// 判断缓存中是否存在ApiToken
        /// </summary>
        /// <param name="key"></param>
        /// <returns></returns>
        public static bool IsValidKey(string key)
        {
            if (Cache.CacheHelper.Memcached_KeyExists(key))
            {
                return true;
            }
            else
            {
                return false;
            }
        }
    }
}